{% load i18n %} {# Translating code #}
<!DOCTYPE html> 
<html lang="{{LANGUAGE_CODE}}">
	<head>
		<meta charset=utf-8>
		<title>{% blocktrans %}Parallel programming learning platform{% endblocktrans %}</title>
		<link rel=​"shortcut icon" href=​"/media/templates/​iconoweb.ico" type=​"imagen/​x-icon">​
		<link href="/media/css/{{request.session.theme}}/pageMain/style.css" type="text/css" rel="stylesheet"/>
		<link href="/media/css/{{request.session.theme}}/loaderAloha/style.css" type="text/css" rel="stylesheet"/>
		<link href="/media/css/{{request.session.theme}}/dialogImage/style.css" type="text/css" rel="stylesheet"/>
		<link href="/media/css/{{request.session.theme}}/dialogFlash/style.css" type="text/css" rel="stylesheet"/>
		<link href="/media/css/{{request.session.theme}}/dialogImageLink/style.css" type="text/css" rel="stylesheet"/>
		<link href="/media/css/{{request.session.theme}}/dialog/style.css" type="text/css" rel="stylesheet"/>
		
		<link href="/media/css/{{request.session.theme}}/dialogImageEditing/style.css" type="text/css" rel="stylesheet"/>
		<link href="/media/css/{{request.session.theme}}/dialogImageLinkEditing/style.css" type="text/css" rel="stylesheet"/>
		{% block cssBlock %}
			
		{% endblock %}
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
		
		<script type="text/javascript" src="/media/js/csrfTokenAjax.js"></script>
		<script type="text/javascript" src="/media/js/jquery.form.js"></script>
		<script type="text/javascript" src="/media/js/multiImg.js"></script>
		<script type="text/javascript" src="/media/js/generic.js"></script>
		

		{% block jsBlock %}
		{% endblock %}
		
	</head>
	<body>
		<!-- ********* MAIN MENU ********* -->
		<aside>
			<!-- Login, Theme, Language -->
			<div>
				<span class="theme">{% blocktrans %}Theme{% endblocktrans %}</span>
				<div class="theme">
					<ul>
						{% for key,value in THEMES.items %}
							{% if '?' in request.get_full_path  %}
								<li><a href="{{request.get_full_path}}&theme={{key}}" class="{{key}}">{{value}}</a></li>
							{% else %}
								<li><a href="{{request.get_full_path}}?theme={{key}}" class="{{key}}">{{value}}</a></li>
							{% endif %}
						{% endfor %}
					</ul>
				</div>
			</div>
			<div>
				<span class="language">{% blocktrans %}Language{% endblocktrans %}</span>
				<div class="language">
	            	<span>{% blocktrans %}Current: {% endblocktrans %}<span class="{{LANGUAGE_CODE}}">[{{LANGUAGE_CODE}}]</span></span>
	            	<form action="/i18n/setlang/" method="post">
						{% csrf_token %}
						<select name="language">
						{% for language in LANGUAGES %}
						<option value="{{ language.0 }}"><span>[{{ language.0 }}] {{ language.1 }}</span></option>
						{% endfor %}
						</select>
						<input type="submit" value="{% blocktrans %}Apply{% endblocktrans %}" />
					</form>
				</div>
			</div>
			<div>
				<span class="login">
					{% if user.is_authenticated %}
						{{user.email}}
					{% else %}
						{% blocktrans %}Login/Register{% endblocktrans %}
					{% endif %}
				</span>
				<div class="login">
					{% if user.is_authenticated %}
						<ul>
							<li><a href="/accounts/profile/">{% blocktrans %}Profile{% endblocktrans %}</a></li>
							<li><a href="/accounts/logout/?next=/">{% blocktrans %}Logout{% endblocktrans %}</a></li>
						</ul>
					{% else %}
						<form action="/accounts/login/" method="post">
						{% csrf_token %}
						<input type="hidden" value="{{request.path}}" name="next"> 
						<label>{% blocktrans %}User{% endblocktrans %}</label><input type="text" name="username" /><br>
						<label>{% blocktrans %}Password{% endblocktrans %}</label><input type="password" name="password" /><br>
						<input type="submit" value="{% blocktrans %}Log in{% endblocktrans %}" />
						</form>
						<p>{% blocktrans %}If you forgot your password,{% endblocktrans %} <a href="/accounts/password/reset/">{% blocktrans %}click here{% endblocktrans %}</a>.<br>{% blocktrans %}If not registered yet,{% endblocktrans %} <a href="/accounts/register/">{% blocktrans %}create a new account{% endblocktrans %}</a>.</p>
					{% endif %}
				</div>
			</div>
		</aside>
		<nav>
			<!-- Menu buttons on top -->
			<ul>
				<li><a href="/"><span></span>Home</a></li>
				{% for link in MENU_LINK %}
					<li><a href="{{link.1}}"><span></span>{{link.0}}</a></li>
				{% endfor %}
            	{% if perms.permissions_wiki.can_admin_page %}
            		<li><a href="/supervise/"><span></span>{% blocktrans %}Supervisor{% endblocktrans %}</a></li>
            	{% endif %}
			</ul>
		</nav>
		<!-- ********** HEADER ********** -->
		<header>
			{% block header %}
				<h1>{% blocktrans %}Parallel Platform{% endblocktrans %}</h1>
			{% endblock %}
		</header>
		<!-- ********** MAIN PAGE ********** -->
		<div class="s1"> <!-- Body of the page -->
            {% block nav %}

			{% endblock %}
			
			<aside class="editOptions">
 				{% block loggedoptions %}
				{% endblock %}
 			</aside>
			
			<!-- first aside -->
			<aside class="errorPanel"> <!-- Errors/Warnings space -->
        		{% if messages %}
				    {% for message in messages %}
				    <p {% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</p>
				    {% endfor %}
				{% endif %}
			</aside>
			
			<!-- Content -->
			<!-- include index for page and content -->
			<article>
				{% block article %}

				{% endblock %}
			</article>
 
    	</div>
    	<footer>
	    	{% block footer %}
	    		<p>{% blocktrans %}Created by{% endblocktrans %} Daniel Guerrero Martínez &amp; Sergio Rodríguez Lumley 2010-2011</p>
	    		<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Licencia de Creative Commons" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a>
	    	{% endblock %}
		</footer>
    </body>
</html>